import java.util.Scanner;
public class homework4_2
{
    public static void main(String[]args)
    {
        System.out.println("\n\n\n\n\n欢迎使用购物管理系统1.0\n\n\n\n\n");
        System.out.println("\t***********************\n");
        System.out.println("\t\t\t1.登录系统\t\t\t");
        System.out.println("\t\t\t2.更改密码\t\t\t");
        System.out.println("\t\t\t3.退出\t\t\t");
        System.out.println("\t***********************\n");
        System.out.print("请选择，输入数字：");
        Scanner input=new Scanner(System.in);
        if (input.hasNextInt())
        {
            int num=input.nextInt();
            String Username="name";
            String password="name";
            String inputname;
            String inputpassword;
            switch (num)
            {
                case 1:
                    System.out.println("请输入用户名：");
                    inputname=input.next();
                    System.out.println("请输入密码：");
                    inputpassword=input.next();
                    if (inputname.equals(Username)&& inputpassword.equals(password))
                    {
                        System.out.println("\n\n\n\n\n欢迎使用购物管理系统\n\n\n\n\n");
                        System.out.println("\t***********************\n");
                        System.out.println("\t\t\t1.客户信息管理\t\t\t");
                        System.out.println("\t\t\t2.购物结算\t\t\t");
                        System.out.println("\t\t\t3.回馈\t\t\t");
                        System.out.println("\t\t\t4.注销\t\t\t");
                        System.out.println("\t***********************\n");
                    }
                    else
                    {
                        System.out.println("error");
                        System.exit(0);
                    }
                break;

                case 2:
                    System.out.println("请输入用户名");
                    inputname=input.next();
                    System.out.println("请输入password");
                    inputpassword=input.next();
                    if (inputname.equals(Username)&& inputpassword.equals(password))
                    {
                        System.out.println("验证成功，请输入新密码");
                        password=input.next();
                        System.out.println("修改成功，请记住新密码");
                    }
                     else
                    {
                        System.out.println("密码错误");
                    }
                    break;

                case 3:
                    System.out.println("再见");
                    break;

                default:
                    System.out.println("输入错误......");
                  break;
            }



        }
        else
        {
            System.out.println("输入的不是数字");
        }

    }

  }
